<!--#include("_tool_header.html")-->
<!--%import("css/pagination.css",optimized=false)-->

<!-- Content -->
<div id="content">
    <!-- contentHeader -->
    <div class="dashboardHeader">
        <h3 class="h3">{sprintf($lang->shop_manage_addresses,$member_info->user_name)}</h3>
    </div>
    <!-- /contentHeader -->
    <div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
        <p>{$XE_VALIDATOR_MESSAGE}</p>
    </div>
    <!-- contentNavigation -->
    <div class="contentNavigation">
        <ul class="sortDefault">
            <a href="{getUrl('act','dispShopToolAddAddress')}">{$lang->add_new_address}</a>
        </ul>
    </div>
    <!-- /contentNavigation -->
    <!-- listHeader -->
    <div class="listHeader" cond="!empty($addresses_list)">
        <p class="info"> <!--@if($search_keyword)-->{sprintf($lang->search_result_count,$page_navigation->total_count)}<!--@else-->{sprintf($lang->total_result_count,$page_navigation->total_count)}<!--@end--></p>
        <fieldset class="search">
            <legend>{$lang->cmd_search}</legend>
            <form action="{Context::getRequestUri()}">
                <input type="hidden" name="published" value="{$published}" />
                <input type="hidden" name="vid" value="{$vid}" />
                <input type="hidden" name="act" value="{$act}" />
                <input type="hidden" name="mid" value="{$mid}" />
                <input type="hidden" name="member_srl" value="{$member_srl}" />

                <input name="search_keyword" type="text" title="{$lang->cmd_search}" class="iText" value="{htmlspecialchars($search_keyword)}"/>
                <span class="btnGray medium"><input type="submit" value="{$lang->cmd_search}" /></span>
            </form>
        </fieldset>
    </div>
    <!-- /listHeader -->

    <!-- Table Data -->
    <fieldset>
        <legend>{$lang->address_management}</legend>
        <form action="" method="post">
            <table border="1" cellspacing="0" summary="{$lang->content_list}" class="tableData">
                <thead>
                <tr cond="!empty($addresses_list)">
                    <th scope="col">
                        <input type="checkbox" class="inputCheck" onclick="jQuery('input.boxlist').click()" />
                    </th>
                    <th scope="col">{$lang->id}</th>
                    <th scope="col" class="title">{$lang->company}</th>
                    <th scope="col">{$lang->firstname}</th>
                    <th scope="col">{$lang->lastname}</th>
                    <th scope="col">{$lang->email}</th>
                    <th scope="col">{$lang->telephone}</th>
                    <th scope="col">{$lang->address}</th>
                    <th scope="col">{$lang->city}</th>
                    <th scope="col">{$lang->region}</th>
                    <th scope="col">{$lang->postal_code}</th>
                    <th scope="col">{$lang->country}</th>
                    <th scope="col">{$lang->regdate}</th>
                    <th scope="col">&nbsp;</th>
                    <th scope="col">&nbsp;</th>
                </tr>
                </thead>
                <tbody>

                <tr cond="empty($addresses_list)">
                    <td class="noData" colspan="9"><p>{sprintf($lang->no_addresses, getUrl('', 'act', 'dispShopToolAddAddress'))}</p></td>
                </tr>
                <!--@foreach($addresses_list as $no => $address)-->
                <tr>
                    <td>
                        <input type="checkbox" name="address_srl" value="{$address->address_srl}" class="inputCheck boxlist" />
                    </td>
                    <td class="small"><a href="{getUrl('act','dispShopToolEditAddress','address_srl',$address->address_srl)}" class="addressName">{$address->address_srl}</a></td>
                    <td class="title">{$address->company}</td>
                    <td class="title">{$address->firstname}</td>
                    <td class="title">{$address->lastname}</td>
                    <td class="title">{$address->email}</td>
                    <td class="small">{$address->telephone}</td>
                    <td class="small">{$address->address}</td>
                    <td class="small">{$address->city}</td>
                    <td class="small">{$address->region}</td>
                    <td class="small">{$address->postal_code}</td>
                    <td class="small">{$address->country}</td>
                    <td class="small">{zdate($address->regdate)}</td>
                    <td>
                        <span class="btnGray small"><a href="{getUrl('act','dispShopToolEditAddress','address_srl',$address->address_srl)}">{$lang->cmd_edit}</a></span>

                    </td>
                    <td>
                        <button type="button" class="btnTableData" onclick="deleteAddressItem({$address->address_srl})"><span>{$lang->cmd_delete}</span></button>
                    </td>
                </tr>
                <!--@end-->

                </tbody>
            </table>

            <div class="listFooter" cond="!empty($addresses_list)">

                <!-- Change-->
                <div class="change">
                    <p class="p1">{$lang->selected_articles}</p>
                    <span class="btnGray large"><button type="button" onclick="deleteAddressItems({$page})"><img src="img/buttonTableDataX.gif" width="7" height="7" alt="" class="icon" />{$lang->cmd_delete}</button></span>

                </div>
                <!-- /Change -->

                <!-- Pagination -->
                <div class="pagination">
                    <a href="{getUrl('page','','mid',$mid)}" class="prev"><span>{$lang->first_page}</span></a>

                    <!--@while($page_no = $page_navigation->getNextPage())-->
                    <!--@if($page == $page_no)-->
                    <strong>{$page_no}</strong>
                    <!--@else-->
                    <a href="{getUrl('page',$page_no,'mid',$mid)}">{$page_no}</a>
                    <!--@end-->
                    <!--@end-->

                    <a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="next"><span>{$lang->last_page}</span></a>
                </div>
                <!-- /Pagination -->

            </div>

        </form>
    </fieldset>
    <!-- /Table Data -->

</div>
<!-- /Content -->


<!-- Extension -->
<!--#include("_tool_menu.html")-->
<!-- Extension -->

<!--#include("_tool_footer.html")-->

<script type="text/javascript">
    if (!xe.lang) xe.lang = {};
    xe.lang.msg_confirm_delete_address = "{$lang->msg_confirm_delete_address}";
    xe.lang.msg_confirm_delete_addresses = '{$lang->msg_confirm_delete_addresses}';
</script>